<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ADC: ADC Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ADC
   &#160;<span id="projectnumber">8.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('class_a_d_c.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="class_a_d_c-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">ADC Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="_a_d_c_8h_source.html">ADC.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Struct for synchronous measurements.  <a href="struct_a_d_c_1_1_sync__result.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a60b6e21403b1f30984f63832c0562960"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a60b6e21403b1f30984f63832c0562960">ADC</a> ()</td></tr>
<tr class="separator:a60b6e21403b1f30984f63832c0562960"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae66fb96c6b11156d714315ce6380e8b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#ae66fb96c6b11156d714315ce6380e8b0">setReference</a> (uint8_t type, int8_t adc_num=-1)</td></tr>
<tr class="memdesc:ae66fb96c6b11156d714315ce6380e8b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the voltage reference you prefer, default is 3.3 V (VCC)  <a href="#ae66fb96c6b11156d714315ce6380e8b0">More...</a><br /></td></tr>
<tr class="separator:ae66fb96c6b11156d714315ce6380e8b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afb4cead11eaa367165b40c8afc62e23d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#afb4cead11eaa367165b40c8afc62e23d">setResolution</a> (uint8_t bits, int8_t adc_num=-1)</td></tr>
<tr class="memdesc:afb4cead11eaa367165b40c8afc62e23d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Change the resolution of the measurement.  <a href="#afb4cead11eaa367165b40c8afc62e23d">More...</a><br /></td></tr>
<tr class="separator:afb4cead11eaa367165b40c8afc62e23d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7280bdee747b978de83923fcfa90cba1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a7280bdee747b978de83923fcfa90cba1"></a>
uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a7280bdee747b978de83923fcfa90cba1">getResolution</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a7280bdee747b978de83923fcfa90cba1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the resolution of the <a class="el" href="class_a_d_c___module.html">ADC_Module</a>. <br /></td></tr>
<tr class="separator:a7280bdee747b978de83923fcfa90cba1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45c14b6ec1e956d12f34a99354559a43"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a45c14b6ec1e956d12f34a99354559a43">getMaxValue</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a45c14b6ec1e956d12f34a99354559a43"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the maximum value for a measurement: 2^res-1.  <a href="#a45c14b6ec1e956d12f34a99354559a43">More...</a><br /></td></tr>
<tr class="separator:a45c14b6ec1e956d12f34a99354559a43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a004d0b11f4bf0ad8328fdf1a7e2897b0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a004d0b11f4bf0ad8328fdf1a7e2897b0">setConversionSpeed</a> (uint8_t speed, int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a004d0b11f4bf0ad8328fdf1a7e2897b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the conversion speed (changes the <a class="el" href="class_a_d_c.html">ADC</a> clock, ADCK)  <a href="#a004d0b11f4bf0ad8328fdf1a7e2897b0">More...</a><br /></td></tr>
<tr class="separator:a004d0b11f4bf0ad8328fdf1a7e2897b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e01908bf556b00a73023eaddfe8e67f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a6e01908bf556b00a73023eaddfe8e67f">setSamplingSpeed</a> (uint8_t speed, int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a6e01908bf556b00a73023eaddfe8e67f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the sampling speed.  <a href="#a6e01908bf556b00a73023eaddfe8e67f">More...</a><br /></td></tr>
<tr class="separator:a6e01908bf556b00a73023eaddfe8e67f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6fd39809addc247f13004687d201003d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a6fd39809addc247f13004687d201003d">setAveraging</a> (uint8_t num, int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a6fd39809addc247f13004687d201003d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the number of averages.  <a href="#a6fd39809addc247f13004687d201003d">More...</a><br /></td></tr>
<tr class="separator:a6fd39809addc247f13004687d201003d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a55c8f57d2b3be4eb1216d45f652bc9c0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a55c8f57d2b3be4eb1216d45f652bc9c0">enableInterrupts</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a55c8f57d2b3be4eb1216d45f652bc9c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable interrupts.  <a href="#a55c8f57d2b3be4eb1216d45f652bc9c0">More...</a><br /></td></tr>
<tr class="separator:a55c8f57d2b3be4eb1216d45f652bc9c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a269ea8bf6891c3095eea3b9d6decce67"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a269ea8bf6891c3095eea3b9d6decce67"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a269ea8bf6891c3095eea3b9d6decce67">disableInterrupts</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a269ea8bf6891c3095eea3b9d6decce67"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable interrupts. <br /></td></tr>
<tr class="separator:a269ea8bf6891c3095eea3b9d6decce67"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bc9f7f1a0be0e38e9e6f517db8b2da7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a1bc9f7f1a0be0e38e9e6f517db8b2da7">enableDMA</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a1bc9f7f1a0be0e38e9e6f517db8b2da7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable DMA request.  <a href="#a1bc9f7f1a0be0e38e9e6f517db8b2da7">More...</a><br /></td></tr>
<tr class="separator:a1bc9f7f1a0be0e38e9e6f517db8b2da7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac53578061bc8bbbd1652b718c6032d07"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac53578061bc8bbbd1652b718c6032d07"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#ac53578061bc8bbbd1652b718c6032d07">disableDMA</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:ac53578061bc8bbbd1652b718c6032d07"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable <a class="el" href="class_a_d_c.html">ADC</a> DMA request. <br /></td></tr>
<tr class="separator:ac53578061bc8bbbd1652b718c6032d07"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1987df39ccda1ce923eca878b3816383"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a1987df39ccda1ce923eca878b3816383">enableCompare</a> (int16_t compValue, bool greaterThan, int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a1987df39ccda1ce923eca878b3816383"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable the compare function to a single value.  <a href="#a1987df39ccda1ce923eca878b3816383">More...</a><br /></td></tr>
<tr class="separator:a1987df39ccda1ce923eca878b3816383"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5b39a0ee459618f6b95cf4e48f77528"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#aa5b39a0ee459618f6b95cf4e48f77528">enableCompareRange</a> (int16_t lowerLimit, int16_t upperLimit, bool insideRange, bool inclusive, int8_t adc_num=-1)</td></tr>
<tr class="memdesc:aa5b39a0ee459618f6b95cf4e48f77528"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable the compare function to a range.  <a href="#aa5b39a0ee459618f6b95cf4e48f77528">More...</a><br /></td></tr>
<tr class="separator:aa5b39a0ee459618f6b95cf4e48f77528"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f511deae378e46a4a9ec80af90bf723"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3f511deae378e46a4a9ec80af90bf723"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a3f511deae378e46a4a9ec80af90bf723">disableCompare</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a3f511deae378e46a4a9ec80af90bf723"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable the compare function. <br /></td></tr>
<tr class="separator:a3f511deae378e46a4a9ec80af90bf723"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace2f33764eff19fca2b1bea444a14819"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#ace2f33764eff19fca2b1bea444a14819">enablePGA</a> (uint8_t gain, int8_t adc_num=-1)</td></tr>
<tr class="memdesc:ace2f33764eff19fca2b1bea444a14819"><td class="mdescLeft">&#160;</td><td class="mdescRight">Enable and set PGA.  <a href="#ace2f33764eff19fca2b1bea444a14819">More...</a><br /></td></tr>
<tr class="separator:ace2f33764eff19fca2b1bea444a14819"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaea8da73b589edbd9e3e501c1e11c398"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#aaea8da73b589edbd9e3e501c1e11c398">getPGA</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:aaea8da73b589edbd9e3e501c1e11c398"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the PGA level.  <a href="#aaea8da73b589edbd9e3e501c1e11c398">More...</a><br /></td></tr>
<tr class="separator:aaea8da73b589edbd9e3e501c1e11c398"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9cb3e1c0ee39b45b4b84630606d85e1"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9cb3e1c0ee39b45b4b84630606d85e1"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#ab9cb3e1c0ee39b45b4b84630606d85e1">disablePGA</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:ab9cb3e1c0ee39b45b4b84630606d85e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disable PGA. <br /></td></tr>
<tr class="separator:ab9cb3e1c0ee39b45b4b84630606d85e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a564c5be3181c2b4ccca3fefc484832cb"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a564c5be3181c2b4ccca3fefc484832cb"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a564c5be3181c2b4ccca3fefc484832cb">isConverting</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a564c5be3181c2b4ccca3fefc484832cb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the <a class="el" href="class_a_d_c.html">ADC</a> converting at the moment? <br /></td></tr>
<tr class="separator:a564c5be3181c2b4ccca3fefc484832cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c508c2333310a834ca2f7cf59079807"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a5c508c2333310a834ca2f7cf59079807">isComplete</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a5c508c2333310a834ca2f7cf59079807"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is an <a class="el" href="class_a_d_c.html">ADC</a> conversion ready?  <a href="#a5c508c2333310a834ca2f7cf59079807">More...</a><br /></td></tr>
<tr class="separator:a5c508c2333310a834ca2f7cf59079807"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1bd89979194f6c9b0aa08463373aaa15"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1bd89979194f6c9b0aa08463373aaa15"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a1bd89979194f6c9b0aa08463373aaa15">isDifferential</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a1bd89979194f6c9b0aa08463373aaa15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the <a class="el" href="class_a_d_c.html">ADC</a> in differential mode? <br /></td></tr>
<tr class="separator:a1bd89979194f6c9b0aa08463373aaa15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bf6474dd2ec0b75269e8fdb268f2c03"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a4bf6474dd2ec0b75269e8fdb268f2c03"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a4bf6474dd2ec0b75269e8fdb268f2c03">isContinuous</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a4bf6474dd2ec0b75269e8fdb268f2c03"><td class="mdescLeft">&#160;</td><td class="mdescRight">Is the <a class="el" href="class_a_d_c.html">ADC</a> in continuous mode? <br /></td></tr>
<tr class="separator:a4bf6474dd2ec0b75269e8fdb268f2c03"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf6079870b115d8b029d3613d44091dd"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#aaf6079870b115d8b029d3613d44091dd">analogRead</a> (uint8_t pin, int8_t adc_num=-1)</td></tr>
<tr class="memdesc:aaf6079870b115d8b029d3613d44091dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the analog value of the pin.  <a href="#aaf6079870b115d8b029d3613d44091dd">More...</a><br /></td></tr>
<tr class="separator:aaf6079870b115d8b029d3613d44091dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec3464cdb697f89cf162813b00b2e965"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#aec3464cdb697f89cf162813b00b2e965">analogReadDifferential</a> (uint8_t pinP, uint8_t pinN, int8_t adc_num=-1)</td></tr>
<tr class="memdesc:aec3464cdb697f89cf162813b00b2e965"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the differential analog value of two pins (pinP - pinN).  <a href="#aec3464cdb697f89cf162813b00b2e965">More...</a><br /></td></tr>
<tr class="separator:aec3464cdb697f89cf162813b00b2e965"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a113479488fae5f5407f884dd95fbec72"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a113479488fae5f5407f884dd95fbec72">startSingleRead</a> (uint8_t pin, int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a113479488fae5f5407f884dd95fbec72"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts an analog measurement on the pin and enables interrupts.  <a href="#a113479488fae5f5407f884dd95fbec72">More...</a><br /></td></tr>
<tr class="separator:a113479488fae5f5407f884dd95fbec72"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1016c1d107118a0064c2b627dbd831b"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#ac1016c1d107118a0064c2b627dbd831b">startSingleDifferential</a> (uint8_t pinP, uint8_t pinN, int8_t adc_num=-1)</td></tr>
<tr class="memdesc:ac1016c1d107118a0064c2b627dbd831b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start a differential conversion between two pins (pinP - pinN) and enables interrupts.  <a href="#ac1016c1d107118a0064c2b627dbd831b">More...</a><br /></td></tr>
<tr class="separator:ac1016c1d107118a0064c2b627dbd831b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee7423bfcbb03465bb0bd1e3c6474452"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#aee7423bfcbb03465bb0bd1e3c6474452">readSingle</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:aee7423bfcbb03465bb0bd1e3c6474452"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the analog value of a single conversion.  <a href="#aee7423bfcbb03465bb0bd1e3c6474452">More...</a><br /></td></tr>
<tr class="separator:aee7423bfcbb03465bb0bd1e3c6474452"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad592f87ec644457b5056ae41c645ac0a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#ad592f87ec644457b5056ae41c645ac0a">startContinuous</a> (uint8_t pin, int8_t adc_num=-1)</td></tr>
<tr class="memdesc:ad592f87ec644457b5056ae41c645ac0a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts continuous conversion on the pin.  <a href="#ad592f87ec644457b5056ae41c645ac0a">More...</a><br /></td></tr>
<tr class="separator:ad592f87ec644457b5056ae41c645ac0a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6179fc2e5ca7de1b0a3eb1f36985885"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#ae6179fc2e5ca7de1b0a3eb1f36985885">startContinuousDifferential</a> (uint8_t pinP, uint8_t pinN, int8_t adc_num=-1)</td></tr>
<tr class="memdesc:ae6179fc2e5ca7de1b0a3eb1f36985885"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts continuous conversion between the pins (pinP-pinN).  <a href="#ae6179fc2e5ca7de1b0a3eb1f36985885">More...</a><br /></td></tr>
<tr class="separator:ae6179fc2e5ca7de1b0a3eb1f36985885"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a749efc928425a1eea18341ccfafd1819"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a749efc928425a1eea18341ccfafd1819">analogReadContinuous</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a749efc928425a1eea18341ccfafd1819"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the analog value of a continuous conversion.  <a href="#a749efc928425a1eea18341ccfafd1819">More...</a><br /></td></tr>
<tr class="separator:a749efc928425a1eea18341ccfafd1819"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a436e52cf82ca735f636899de670a2f0c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a436e52cf82ca735f636899de670a2f0c">stopContinuous</a> (int8_t adc_num=-1)</td></tr>
<tr class="memdesc:a436e52cf82ca735f636899de670a2f0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops continuous conversion.  <a href="#a436e52cf82ca735f636899de670a2f0c">More...</a><br /></td></tr>
<tr class="separator:a436e52cf82ca735f636899de670a2f0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac8067db45057f691e664f414d1376d1e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#ac8067db45057f691e664f414d1376d1e">analogSynchronizedRead</a> (uint8_t pin0, uint8_t pin1)</td></tr>
<tr class="memdesc:ac8067db45057f691e664f414d1376d1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the analog values of both pins, measured at the same time by the two <a class="el" href="class_a_d_c.html">ADC</a> modules.  <a href="#ac8067db45057f691e664f414d1376d1e">More...</a><br /></td></tr>
<tr class="separator:ac8067db45057f691e664f414d1376d1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13b01aabc3f0560ceb822a04bf936022"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a13b01aabc3f0560ceb822a04bf936022"></a>
<a class="el" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a13b01aabc3f0560ceb822a04bf936022">analogSyncRead</a> (uint8_t pin0, uint8_t pin1) __attribute__((always_inline))</td></tr>
<tr class="memdesc:a13b01aabc3f0560ceb822a04bf936022"><td class="mdescLeft">&#160;</td><td class="mdescRight">Same as analogSynchronizedRead. <br /></td></tr>
<tr class="separator:a13b01aabc3f0560ceb822a04bf936022"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a156bb3fe55e8155dc42fd7e9df1eaa55"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a156bb3fe55e8155dc42fd7e9df1eaa55">analogSynchronizedReadDifferential</a> (uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N)</td></tr>
<tr class="memdesc:a156bb3fe55e8155dc42fd7e9df1eaa55"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the differential analog values of both sets of pins, measured at the same time by the two <a class="el" href="class_a_d_c.html">ADC</a> modules.  <a href="#a156bb3fe55e8155dc42fd7e9df1eaa55">More...</a><br /></td></tr>
<tr class="separator:a156bb3fe55e8155dc42fd7e9df1eaa55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0fc73bc95f8186f524773d9b0282bbf3"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0fc73bc95f8186f524773d9b0282bbf3"></a>
<a class="el" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a0fc73bc95f8186f524773d9b0282bbf3">analogSyncReadDifferential</a> (uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N) __attribute__((always_inline))</td></tr>
<tr class="memdesc:a0fc73bc95f8186f524773d9b0282bbf3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Same as analogSynchronizedReadDifferential. <br /></td></tr>
<tr class="separator:a0fc73bc95f8186f524773d9b0282bbf3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbdb0f3a7419e5a0cd8b2c031dc8b9d7"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#acbdb0f3a7419e5a0cd8b2c031dc8b9d7">startSynchronizedSingleRead</a> (uint8_t pin0, uint8_t pin1)</td></tr>
<tr class="memdesc:acbdb0f3a7419e5a0cd8b2c031dc8b9d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts an analog measurement at the same time on the two <a class="el" href="class_a_d_c.html">ADC</a> modules.  <a href="#acbdb0f3a7419e5a0cd8b2c031dc8b9d7">More...</a><br /></td></tr>
<tr class="separator:acbdb0f3a7419e5a0cd8b2c031dc8b9d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9cebd13de5da420591c779916865824a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a9cebd13de5da420591c779916865824a">startSynchronizedSingleDifferential</a> (uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N)</td></tr>
<tr class="memdesc:a9cebd13de5da420591c779916865824a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start a differential conversion between two pins (pin0P - pin0N) and (pin1P - pin1N)  <a href="#a9cebd13de5da420591c779916865824a">More...</a><br /></td></tr>
<tr class="separator:a9cebd13de5da420591c779916865824a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a38d941542bbdbc20c1b9e26a5051094a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a38d941542bbdbc20c1b9e26a5051094a">readSynchronizedSingle</a> ()</td></tr>
<tr class="memdesc:a38d941542bbdbc20c1b9e26a5051094a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reads the analog value of a single conversion.  <a href="#a38d941542bbdbc20c1b9e26a5051094a">More...</a><br /></td></tr>
<tr class="separator:a38d941542bbdbc20c1b9e26a5051094a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af50305b76bf8798da1dd26f654b4f0e3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#af50305b76bf8798da1dd26f654b4f0e3">startSynchronizedContinuous</a> (uint8_t pin0, uint8_t pin1)</td></tr>
<tr class="memdesc:af50305b76bf8798da1dd26f654b4f0e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts a continuous conversion in both ADCs simultaneously.  <a href="#af50305b76bf8798da1dd26f654b4f0e3">More...</a><br /></td></tr>
<tr class="separator:af50305b76bf8798da1dd26f654b4f0e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29851ff11635dcd85cff21a92271b571"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a29851ff11635dcd85cff21a92271b571">startSynchronizedContinuousDifferential</a> (uint8_t pin0P, uint8_t pin0N, uint8_t pin1P, uint8_t pin1N)</td></tr>
<tr class="memdesc:a29851ff11635dcd85cff21a92271b571"><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts a continuous differential conversion in both ADCs simultaneously.  <a href="#a29851ff11635dcd85cff21a92271b571">More...</a><br /></td></tr>
<tr class="separator:a29851ff11635dcd85cff21a92271b571"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd10f3bc117a244e70e53c3489aa97bc"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acd10f3bc117a244e70e53c3489aa97bc"></a>
<a class="el" href="struct_a_d_c_1_1_sync__result.html">Sync_result</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#acd10f3bc117a244e70e53c3489aa97bc">readSynchronizedContinuous</a> ()</td></tr>
<tr class="memdesc:acd10f3bc117a244e70e53c3489aa97bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the values of both ADCs. <br /></td></tr>
<tr class="separator:acd10f3bc117a244e70e53c3489aa97bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2070250dd4d557b27ec0f4f2b360f21"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac2070250dd4d557b27ec0f4f2b360f21"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#ac2070250dd4d557b27ec0f4f2b360f21">stopSynchronizedContinuous</a> ()</td></tr>
<tr class="memdesc:ac2070250dd4d557b27ec0f4f2b360f21"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stops synchronous continuous conversion. <br /></td></tr>
<tr class="separator:ac2070250dd4d557b27ec0f4f2b360f21"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a0d5b4dd16bbb03082daeeaadafec2474"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0d5b4dd16bbb03082daeeaadafec2474"></a>
<a class="el" href="class_a_d_c___module.html">ADC_Module</a> *const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a0d5b4dd16bbb03082daeeaadafec2474">adc0</a></td></tr>
<tr class="memdesc:a0d5b4dd16bbb03082daeeaadafec2474"><td class="mdescLeft">&#160;</td><td class="mdescRight">Object to control the ADC0. <br /></td></tr>
<tr class="separator:a0d5b4dd16bbb03082daeeaadafec2474"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f6c4642e9e5400220452feeb6be13b8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8f6c4642e9e5400220452feeb6be13b8"></a>
<a class="el" href="class_a_d_c___module.html">ADC_Module</a> *const&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a8f6c4642e9e5400220452feeb6be13b8">adc1</a></td></tr>
<tr class="memdesc:a8f6c4642e9e5400220452feeb6be13b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Object to control the ADC1. <br /></td></tr>
<tr class="separator:a8f6c4642e9e5400220452feeb6be13b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr class="memitem:a7d9a0a2e047047c5148b8b4ed13736de"><td class="memItemLeft" align="right" valign="top">static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a7d9a0a2e047047c5148b8b4ed13736de">channel2sc1aADC0</a> [44]</td></tr>
<tr class="memdesc:a7d9a0a2e047047c5148b8b4ed13736de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Translate pin number to SC1A nomenclature.  <a href="#a7d9a0a2e047047c5148b8b4ed13736de">More...</a><br /></td></tr>
<tr class="separator:a7d9a0a2e047047c5148b8b4ed13736de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a771218b6e00b24c3eee1446e6e480d9f"><td class="memItemLeft" align="right" valign="top">static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a771218b6e00b24c3eee1446e6e480d9f">channel2sc1aADC1</a> [44]</td></tr>
<tr class="memdesc:a771218b6e00b24c3eee1446e6e480d9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Translate pin number to SC1A nomenclature.  <a href="#a771218b6e00b24c3eee1446e6e480d9f">More...</a><br /></td></tr>
<tr class="separator:a771218b6e00b24c3eee1446e6e480d9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac83f0521b05578ac1faf0966a3128f33"><td class="memItemLeft" align="right" valign="top">static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#ac83f0521b05578ac1faf0966a3128f33">sc1a2channelADC0</a> [44]</td></tr>
<tr class="memdesc:ac83f0521b05578ac1faf0966a3128f33"><td class="mdescLeft">&#160;</td><td class="mdescRight">Translate pin number to SC1A nomenclature for differential pins.  <a href="#ac83f0521b05578ac1faf0966a3128f33">More...</a><br /></td></tr>
<tr class="separator:ac83f0521b05578ac1faf0966a3128f33"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8769995229f5dc1f8dc4191eb97f9e09"><td class="memItemLeft" align="right" valign="top">static const uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a8769995229f5dc1f8dc4191eb97f9e09">sc1a2channelADC1</a> [44]</td></tr>
<tr class="memdesc:a8769995229f5dc1f8dc4191eb97f9e09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Translate pin number to SC1A nomenclature for differential pins.  <a href="#a8769995229f5dc1f8dc4191eb97f9e09">More...</a><br /></td></tr>
<tr class="separator:a8769995229f5dc1f8dc4191eb97f9e09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3ac941166af84754393ce2e3006a1c16"><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="struct_a_d_c___module_1_1_a_d_c___n_l_i_s_t.html">ADC_Module::ADC_NLIST</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#a3ac941166af84754393ce2e3006a1c16">diff_table_ADC0</a> [ADC_DIFF_PAIRS]</td></tr>
<tr class="memdesc:a3ac941166af84754393ce2e3006a1c16"><td class="mdescLeft">&#160;</td><td class="mdescRight">Translate differential pin number to SC1A nomenclature.  <a href="#a3ac941166af84754393ce2e3006a1c16">More...</a><br /></td></tr>
<tr class="separator:a3ac941166af84754393ce2e3006a1c16"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac75d6d8768a6def95664d8bb00ae502a"><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="struct_a_d_c___module_1_1_a_d_c___n_l_i_s_t.html">ADC_Module::ADC_NLIST</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_a_d_c.html#ac75d6d8768a6def95664d8bb00ae502a">diff_table_ADC1</a> [ADC_DIFF_PAIRS]</td></tr>
<tr class="memdesc:ac75d6d8768a6def95664d8bb00ae502a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Translate differential pin number to SC1A nomenclature.  <a href="#ac75d6d8768a6def95664d8bb00ae502a">More...</a><br /></td></tr>
<tr class="separator:ac75d6d8768a6def95664d8bb00ae502a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class <a class="el" href="class_a_d_c.html">ADC</a>: Controls the Teensy 3.x <a class="el" href="class_a_d_c.html">ADC</a> </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a60b6e21403b1f30984f63832c0562960"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ADC::ADC </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Default constructor </p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="aaf6079870b115d8b029d3613d44091dd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ADC::analogRead </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the analog value of the pin. </p>
<p>It waits until the value is read and then returns the result. If a comparison has been set up and fails, it will return ADC_ERROR_VALUE. This function is interrupt safe, so it will restore the adc to the state it was before being called If more than one <a class="el" href="class_a_d_c.html">ADC</a> exists, it will select the module with less workload, you can force a selection using adc_num. If you select ADC1 in Teensy 3.0 it will return ADC_ERROR_VALUE. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>can be any of the analog pins </td></tr>
    <tr><td class="paramname">adc_num</td><td>ADC_X <a class="el" href="class_a_d_c.html">ADC</a> module </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a749efc928425a1eea18341ccfafd1819"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ADC::analogReadContinuous </td>
          <td>(</td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the analog value of a continuous conversion. </p>
<p>Set the continuous conversion with with analogStartContinuous(pin) or startContinuousDifferential(pinP, pinN). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">adc_num</td><td>ADC_X <a class="el" href="class_a_d_c.html">ADC</a> module </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the last converted value. If single-ended and 16 bits it's necessary to typecast it to an unsigned type (like uint16_t), otherwise values larger than 3.3/2 V are interpreted as negative!</dd></dl>
<p>Set the continuous conversion with with analogStartContinuous(pin) or startContinuousDifferential(pinP, pinN). </p><dl class="section return"><dt>Returns</dt><dd>the last converted value. If single-ended and 16 bits it's necessary to typecast it to an unsigned type (like uint16_t), otherwise values larger than 3.3/2 V are interpreted as negative! </dd></dl>

</div>
</div>
<a class="anchor" id="aec3464cdb697f89cf162813b00b2e965"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ADC::analogReadDifferential </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinN</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the differential analog value of two pins (pinP - pinN). </p>
<p>It waits until the value is read and then returns the result. If a comparison has been set up and fails, it will return ADC_ERROR_VALUE. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pinP</td><td>must be A10 or A12. </td></tr>
    <tr><td class="paramname">pinN</td><td>must be A11 (if pinP=A10) or A13 (if pinP=A12). </td></tr>
    <tr><td class="paramname">adc_num</td><td>ADC_X <a class="el" href="class_a_d_c.html">ADC</a> module Other pins will return ADC_ERROR_VALUE.</td></tr>
  </table>
  </dd>
</dl>
<p>This function is interrupt safe, so it will restore the adc to the state it was before being called If more than one <a class="el" href="class_a_d_c.html">ADC</a> exists, it will select the module with less workload, you can force a selection using adc_num </p>

</div>
</div>
<a class="anchor" id="ac8067db45057f691e664f414d1376d1e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_a_d_c_1_1_sync__result.html">ADC::Sync_result</a> ADC::analogSynchronizedRead </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin1</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the analog values of both pins, measured at the same time by the two <a class="el" href="class_a_d_c.html">ADC</a> modules. </p>
<p>It waits until the values are read and then returns the result as a struct <a class="el" href="struct_a_d_c_1_1_sync__result.html" title="Struct for synchronous measurements. ">Sync_result</a>, use Sync_result.result_adc0 and Sync_result.result_adc1. If a comparison has been set up and fails, it will return ADC_ERROR_VALUE in both fields of the struct. This function is interrupt safe, so it will restore the adc to the state it was before being called </p>

</div>
</div>
<a class="anchor" id="a156bb3fe55e8155dc42fd7e9df1eaa55"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_a_d_c_1_1_sync__result.html">ADC::Sync_result</a> ADC::analogSynchronizedReadDifferential </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin0P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin0N</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin1P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin1N</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the differential analog values of both sets of pins, measured at the same time by the two <a class="el" href="class_a_d_c.html">ADC</a> modules. </p>
<p>It waits until the values are read and then returns the result as a struct <a class="el" href="struct_a_d_c_1_1_sync__result.html" title="Struct for synchronous measurements. ">Sync_result</a>, use Sync_result.result_adc0 and Sync_result.result_adc1. If a comparison has been set up and fails, it will return ADC_ERROR_VALUE in both fields of the struct. This function is interrupt safe, so it will restore the adc to the state it was before being called </p>

</div>
</div>
<a class="anchor" id="a1987df39ccda1ce923eca878b3816383"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC::enableCompare </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>compValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>greaterThan</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable the compare function to a single value. </p>
<p>A conversion will be completed only when the <a class="el" href="class_a_d_c.html">ADC</a> value is &gt;= compValue (greaterThan=1) or &lt; compValue (greaterThan=0) Call it after changing the resolution Use with interrupts or poll conversion completion with <a class="el" href="class_a_d_c.html#a5c508c2333310a834ca2f7cf59079807" title="Is an ADC conversion ready? ">isComplete()</a> </p>

</div>
</div>
<a class="anchor" id="aa5b39a0ee459618f6b95cf4e48f77528"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC::enableCompareRange </td>
          <td>(</td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>lowerLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int16_t&#160;</td>
          <td class="paramname"><em>upperLimit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>insideRange</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>inclusive</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable the compare function to a range. </p>
<p>A conversion will be completed only when the <a class="el" href="class_a_d_c.html">ADC</a> value is inside (insideRange=1) or outside (=0) the range given by (lowerLimit, upperLimit),including (inclusive=1) the limits or not (inclusive=0). See Table 31-78, p. 617 of the freescale manual. Call it after changing the resolution Use with interrupts or poll conversion completion with <a class="el" href="class_a_d_c.html#a5c508c2333310a834ca2f7cf59079807" title="Is an ADC conversion ready? ">isComplete()</a> </p>

</div>
</div>
<a class="anchor" id="a1bc9f7f1a0be0e38e9e6f517db8b2da7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC::enableDMA </td>
          <td>(</td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable DMA request. </p>
<p>An <a class="el" href="class_a_d_c.html">ADC</a> DMA request will be raised when the conversion is completed (including hardware averages and if the comparison (if any) is true). </p>

</div>
</div>
<a class="anchor" id="a55c8f57d2b3be4eb1216d45f652bc9c0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC::enableInterrupts </td>
          <td>(</td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable interrupts. </p>
<p>An IRQ_ADC0 Interrupt will be raised when the conversion is completed (including hardware averages and if the comparison (if any) is true). </p>

</div>
</div>
<a class="anchor" id="ace2f33764eff19fca2b1bea444a14819"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC::enablePGA </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>gain</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Enable and set PGA. </p>
<p>Enables the PGA and sets the gain Use only for signals lower than 1.2 V </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">gain</td><td>can be 1, 2, 4, 8, 16, 32 or 64 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a45c14b6ec1e956d12f34a99354559a43"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint32_t ADC::getMaxValue </td>
          <td>(</td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the maximum value for a measurement: 2^res-1. </p>
<p>Returns the maximum value for a measurement. </p>

</div>
</div>
<a class="anchor" id="aaea8da73b589edbd9e3e501c1e11c398"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t ADC::getPGA </td>
          <td>(</td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the PGA level. </p>
<p>PGA level = from 1 to 64</p>
<p>PGA level = 2^gain, from 0 to 64 </p>

</div>
</div>
<a class="anchor" id="a5c508c2333310a834ca2f7cf59079807"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC::isComplete </td>
          <td>(</td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Is an <a class="el" href="class_a_d_c.html">ADC</a> conversion ready? </p>
<dl class="section return"><dt>Returns</dt><dd>1 if yes, 0 if not. When a value is read this function returns 0 until a new value exists So it only makes sense to call it with continuous or non-blocking methods </dd></dl>

</div>
</div>
<a class="anchor" id="aee7423bfcbb03465bb0bd1e3c6474452"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int ADC::readSingle </td>
          <td>(</td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the analog value of a single conversion. </p>
<p>Set the conversion with with startSingleRead(pin) or startSingleDifferential(pinP, pinN). </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">adc_num</td><td>ADC_X <a class="el" href="class_a_d_c.html">ADC</a> module </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the converted value. </dd></dl>

</div>
</div>
<a class="anchor" id="a38d941542bbdbc20c1b9e26a5051094a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="struct_a_d_c_1_1_sync__result.html">ADC::Sync_result</a> ADC::readSynchronizedSingle </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reads the analog value of a single conversion. </p>
<dl class="section return"><dt>Returns</dt><dd>the converted value. </dd></dl>

</div>
</div>
<a class="anchor" id="a6fd39809addc247f13004687d201003d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC::setAveraging </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the number of averages. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">num</td><td>can be 0, 4, 8, 16 or 32. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a004d0b11f4bf0ad8328fdf1a7e2897b0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC::setConversionSpeed </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>speed</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the conversion speed (changes the <a class="el" href="class_a_d_c.html">ADC</a> clock, ADCK) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">speed</td><td>can be ADC_VERY_LOW_SPEED, ADC_LOW_SPEED, ADC_MED_SPEED, ADC_HIGH_SPEED_16BITS, ADC_HIGH_SPEED or ADC_VERY_HIGH_SPEED.</td></tr>
  </table>
  </dd>
</dl>
<p>ADC_VERY_LOW_SPEED is guaranteed to be the lowest possible speed within specs for resolutions less than 16 bits (higher than 1 MHz), it's different from ADC_LOW_SPEED only for 24, 4 or 2 MHz bus frequency. ADC_LOW_SPEED is guaranteed to be the lowest possible speed within specs for all resolutions (higher than 2 MHz). ADC_MED_SPEED is always &gt;= ADC_LOW_SPEED and &lt;= ADC_HIGH_SPEED. ADC_HIGH_SPEED_16BITS is guaranteed to be the highest possible speed within specs for all resolutions (lower or eq than 12 MHz). ADC_HIGH_SPEED is guaranteed to be the highest possible speed within specs for resolutions less than 16 bits (lower or eq than 18 MHz). ADC_VERY_HIGH_SPEED may be out of specs, it's different from ADC_HIGH_SPEED only for 48, 40 or 24 MHz bus frequency.</p>
<p>Additionally the conversion speed can also be ADC_ADACK_2_4, ADC_ADACK_4_0, ADC_ADACK_5_2 and ADC_ADACK_6_2, where the numbers are the frequency of the <a class="el" href="class_a_d_c.html">ADC</a> clock (ADCK) in MHz and are independent on the bus speed. This is useful if you are using the Teensy at a very low clock frequency but want faster conversions, but if F_BUS&lt;F_ADCK, you can't use ADC_VERY_HIGH_SPEED for sampling speed. </p>

</div>
</div>
<a class="anchor" id="ae66fb96c6b11156d714315ce6380e8b0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC::setReference </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the voltage reference you prefer, default is 3.3 V (VCC) </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>can be ADC_REF_3V3, ADC_REF_1V2 (not for Teensy LC) or ADC_REF_EXT.</td></tr>
  </table>
  </dd>
</dl>
<p>It re-calibrates at the end. </p>

</div>
</div>
<a class="anchor" id="afb4cead11eaa367165b40c8afc62e23d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC::setResolution </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>bits</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Change the resolution of the measurement. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">bits</td><td>is the number of bits of resolution. For single-ended measurements: 8, 10, 12 or 16 bits. For differential measurements: 9, 11, 13 or 16 bits. If you want something in between (11 bits single-ended for example) select the immediate higher and shift the result one to the right.</td></tr>
  </table>
  </dd>
</dl>
<p>Whenever you change the resolution, change also the comparison values (if you use them). </p>

</div>
</div>
<a class="anchor" id="a6e01908bf556b00a73023eaddfe8e67f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC::setSamplingSpeed </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>speed</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the sampling speed. </p>
<p>Increase the sampling speed for low impedance sources, decrease it for higher impedance ones. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">speed</td><td>can be ADC_VERY_LOW_SPEED, ADC_LOW_SPEED, ADC_MED_SPEED, ADC_HIGH_SPEED or ADC_VERY_HIGH_SPEED.</td></tr>
  </table>
  </dd>
</dl>
<p>ADC_VERY_LOW_SPEED is the lowest possible sampling speed (+24 ADCK). ADC_LOW_SPEED adds +16 ADCK. ADC_MED_SPEED adds +10 ADCK. ADC_HIGH_SPEED (or ADC_HIGH_SPEED_16BITS) adds +6 ADCK. ADC_VERY_HIGH_SPEED is the highest possible sampling speed (0 ADCK added). </p>

</div>
</div>
<a class="anchor" id="ad592f87ec644457b5056ae41c645ac0a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC::startContinuous </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts continuous conversion on the pin. </p>
<p>It returns as soon as the <a class="el" href="class_a_d_c.html">ADC</a> is set, use <a class="el" href="class_a_d_c.html#a749efc928425a1eea18341ccfafd1819" title="Reads the analog value of a continuous conversion. ">analogReadContinuous()</a> to read the value. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>can be any of the analog pins </td></tr>
    <tr><td class="paramname">adc_num</td><td>ADC_X <a class="el" href="class_a_d_c.html">ADC</a> module </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae6179fc2e5ca7de1b0a3eb1f36985885"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC::startContinuousDifferential </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinN</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts continuous conversion between the pins (pinP-pinN). </p>
<p>It returns as soon as the <a class="el" href="class_a_d_c.html">ADC</a> is set, use <a class="el" href="class_a_d_c.html#a749efc928425a1eea18341ccfafd1819" title="Reads the analog value of a continuous conversion. ">analogReadContinuous()</a> to read the value. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pinP</td><td>must be A10 or A12. </td></tr>
    <tr><td class="paramname">pinN</td><td>must be A11 (if pinP=A10) or A13 (if pinP=A12). </td></tr>
    <tr><td class="paramname">adc_num</td><td>ADC_X <a class="el" href="class_a_d_c.html">ADC</a> module Other pins will return ADC_ERROR_DIFF_VALUE. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac1016c1d107118a0064c2b627dbd831b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC::startSingleDifferential </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinP</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pinN</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start a differential conversion between two pins (pinP - pinN) and enables interrupts. </p>
<p>It returns immediately, get value with <a class="el" href="class_a_d_c.html#aee7423bfcbb03465bb0bd1e3c6474452" title="Reads the analog value of a single conversion. ">readSingle()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pinP</td><td>must be A10 or A12. </td></tr>
    <tr><td class="paramname">pinN</td><td>must be A11 (if pinP=A10) or A13 (if pinP=A12). </td></tr>
    <tr><td class="paramname">adc_num</td><td>ADC_X <a class="el" href="class_a_d_c.html">ADC</a> module</td></tr>
  </table>
  </dd>
</dl>
<p>Other pins will return ADC_ERROR_DIFF_VALUE. If this function interrupts a measurement, it stores the settings in adc_config </p>

</div>
</div>
<a class="anchor" id="a113479488fae5f5407f884dd95fbec72"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC::startSingleRead </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts an analog measurement on the pin and enables interrupts. </p>
<p>It returns immediately, get value with <a class="el" href="class_a_d_c.html#aee7423bfcbb03465bb0bd1e3c6474452" title="Reads the analog value of a single conversion. ">readSingle()</a>. If the pin is incorrect it returns ADC_ERROR_VALUE If this function interrupts a measurement, it stores the settings in adc_config </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin</td><td>can be any of the analog pins </td></tr>
    <tr><td class="paramname">adc_num</td><td>ADC_X <a class="el" href="class_a_d_c.html">ADC</a> module </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="af50305b76bf8798da1dd26f654b4f0e3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC::startSynchronizedContinuous </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin1</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts a continuous conversion in both ADCs simultaneously. </p>
<p>Use readSynchronizedContinuous to get the values </p>

</div>
</div>
<a class="anchor" id="a29851ff11635dcd85cff21a92271b571"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC::startSynchronizedContinuousDifferential </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin0P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin0N</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin1P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin1N</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts a continuous differential conversion in both ADCs simultaneously. </p>
<p>Use readSynchronizedContinuous to get the values </p>

</div>
</div>
<a class="anchor" id="a9cebd13de5da420591c779916865824a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC::startSynchronizedSingleDifferential </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin0P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin0N</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin1P</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin1N</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start a differential conversion between two pins (pin0P - pin0N) and (pin1P - pin1N) </p>
<p>It returns immediately, get value with <a class="el" href="class_a_d_c.html#a38d941542bbdbc20c1b9e26a5051094a" title="Reads the analog value of a single conversion. ">readSynchronizedSingle()</a>. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">pin0P,pin1P</td><td>must be A10 or A12. </td></tr>
    <tr><td class="paramname">pin0N,pin1N</td><td>must be A11 (if pinP=A10) or A13 (if pinP=A12). Other pins will return false. If this function interrupts a measurement, it stores the settings in adc_config </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="acbdb0f3a7419e5a0cd8b2c031dc8b9d7"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool ADC::startSynchronizedSingleRead </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin0</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>pin1</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Starts an analog measurement at the same time on the two <a class="el" href="class_a_d_c.html">ADC</a> modules. </p>
<p>It returns immediately, get value with <a class="el" href="class_a_d_c.html#a38d941542bbdbc20c1b9e26a5051094a" title="Reads the analog value of a single conversion. ">readSynchronizedSingle()</a>. If the pin is incorrect it returns false If this function interrupts a measurement, it stores the settings in adc_config </p>

</div>
</div>
<a class="anchor" id="a436e52cf82ca735f636899de670a2f0c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ADC::stopContinuous </td>
          <td>(</td>
          <td class="paramtype">int8_t&#160;</td>
          <td class="paramname"><em>adc_num</em> = <code>-1</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stops continuous conversion. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">adc_num</td><td>ADC_X <a class="el" href="class_a_d_c.html">ADC</a> module </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="a7d9a0a2e047047c5148b8b4ed13736de"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const uint8_t ADC::channel2sc1aADC0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= { </div><div class="line">    5, 14, 8, 9, 13, 12, 6, 7, 15, 4, 0, 19, 3, 31, </div><div class="line">    5, 14, 8, 9, 13, 12, 6, 7, 15, 4, </div><div class="line">    31, 31, 31, 31, 31, 31, 31, 31, 31, 31, </div><div class="line">    0+ADC_SC1A_PIN_DIFF, 19+ADC_SC1A_PIN_DIFF, 3+ADC_SC1A_PIN_DIFF, 31+ADC_SC1A_PIN_DIFF, </div><div class="line">    26, 22, 23, 27, 29, 30 </div><div class="line">}</div></div><!-- fragment -->
<p>Translate pin number to SC1A nomenclature. </p>

</div>
</div>
<a class="anchor" id="a771218b6e00b24c3eee1446e6e480d9f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const uint8_t ADC::channel2sc1aADC1</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= { </div><div class="line">    31, 31, 8, 9, 31, 31, 31, 31, 31, 31, 3, 31, 0, 19, </div><div class="line">    31, 31, 8, 9, 31, 31, 31, 31, 31, 31, </div><div class="line">    31, 31,  </div><div class="line">    5+ADC_SC1A_PIN_MUX, 5, 4, 6, 7, 4+ADC_SC1A_PIN_MUX, 31, 31, </div><div class="line">    3+ADC_SC1A_PIN_DIFF, 31+ADC_SC1A_PIN_DIFF, 0+ADC_SC1A_PIN_DIFF, 19+ADC_SC1A_PIN_DIFF, </div><div class="line">    26, 18, 31, 27, 29, 30 </div><div class="line">}</div></div><!-- fragment -->
<p>Translate pin number to SC1A nomenclature. </p>

</div>
</div>
<a class="anchor" id="a3ac941166af84754393ce2e3006a1c16"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="struct_a_d_c___module_1_1_a_d_c___n_l_i_s_t.html">ADC_Module::ADC_NLIST</a> ADC::diff_table_ADC0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= {</div><div class="line">        {A10, 0+ADC_SC1A_PIN_PGA}, {A12, 3}</div><div class="line">    }</div></div><!-- fragment -->
<p>Translate differential pin number to SC1A nomenclature. </p>

</div>
</div>
<a class="anchor" id="ac75d6d8768a6def95664d8bb00ae502a"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="struct_a_d_c___module_1_1_a_d_c___n_l_i_s_t.html">ADC_Module::ADC_NLIST</a> ADC::diff_table_ADC1</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= {</div><div class="line">        {A10, 3}, {A12, 0+ADC_SC1A_PIN_PGA}</div><div class="line">    }</div></div><!-- fragment -->
<p>Translate differential pin number to SC1A nomenclature. </p>

</div>
</div>
<a class="anchor" id="ac83f0521b05578ac1faf0966a3128f33"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const uint8_t ADC::sc1a2channelADC0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= { </div><div class="line">    34, 0, 0, 36, 23, 14, 20, 21, 16, 17, 0, 0, 19, 18, </div><div class="line">    15, 22, 23, 0, 0, 35, 0, 37, </div><div class="line">    39, 40, 0, 0, 38, 41, 42, 43, </div><div class="line">    0 </div><div class="line">}</div></div><!-- fragment -->
<p>Translate pin number to SC1A nomenclature for differential pins. </p>

</div>
</div>
<a class="anchor" id="a8769995229f5dc1f8dc4191eb97f9e09"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const uint8_t ADC::sc1a2channelADC1</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">= { </div><div class="line">    36, 0, 0, 34, 28, 26, 29, 30, 16, 17, 0, 0, 0, 0, </div><div class="line">    0, 0, 0, 0, 39, 37, 0, 0, </div><div class="line">    0, 0, 0, 0, 38, 41, 0, 42, </div><div class="line">    43</div><div class="line">}</div></div><!-- fragment -->
<p>Translate pin number to SC1A nomenclature for differential pins. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="_a_d_c_8h_source.html">ADC.h</a></li>
<li>ADC.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_a_d_c.html">ADC</a></li>
    <li class="footer">Generated on Sun Jun 26 2016 16:42:58 for ADC by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
